import React from 'react'

export default function Count(props) {
    console.log(props);
    return (
      <div>
        <h1>这是一个count组件,实现计数</h1>
        <h3>{props.count}</h3>
        <button
          onClick={() => {
            props.addAsync(9);
          }}
        >
          +
        </button>
        <button
          onClick={() => {
            props.addAsync(-9);
          }}
        >
          -
        </button>
      </div>
    );
}
